import { createNativeStackNavigator } from '@react-navigation/native-stack';
import Home from './app/home.js';
import Count from './app/count.js';
import Setting from './app/setting.js';
import Game_main from './app/game/game_main.js';
import Game_stop from './app/game/game_stop.js';
import Game_select from './app/game/game_select.js';
import Game_success from './app/game/game_success.js';
import Game_failure from './app/game/game_failure.js';
import { NavigationContainer } from '@react-navigation/native';

const Stack=createNativeStackNavigator();

export default function App(){
    return(
      <NavigationContainer>
        <Stack.Navigator initialRouteName='Home' >
          <Stack.Screen name="Home"
           component={Home} 
           options={{ headerShown: false }}
           />
          <Stack.Screen name="Count" 
          component={Count} 
          options={{ title: '统计信息' ,
            headerStyle: { backgroundColor: '#f5f5f5',
            borderBottomWidth: 0
           }
          }}
          />
          <Stack.Screen name="Setting" 
          component={Setting}
          options={{ title: '设置' ,
              headerStyle: { backgroundColor: '#f5f5f5',
              borderBottomWidth: 0
          }}}
          />
          <Stack.Screen name="Game_main" 
          component={Game_main}
          options={{ title: '数独游戏' ,
              headerStyle: { backgroundColor: '#f5f5f5',
              borderBottomWidth: 0
          }}}
          />
          <Stack.Screen name="Game_stop" 
          component={Game_stop}
          options={{ headerShown: false }}
          />
          <Stack.Screen name="Game_select"
          component={Game_select}
          options={{ title: '选择关卡' ,
            headerStyle: { backgroundColor: '#f5f5f5',
            borderBottomWidth: 0
          }}}
          />
          <Stack.Screen name="Game_success"
          component={Game_success}
          options={{ headerShown: false }}
          /><Stack.Screen name="Game_failure"
          component={Game_failure}
          options={{ headerShown: false }}
          />
        </Stack.Navigator>
      </NavigationContainer>
    )
}